<div class="nav-sub w1180">
	<ul class="zoom">
		<li><a class="on" href="">编辑溯源</a></li>
		<li><a href="/crm/material/catelog-list">溯源类型列表</a></li>
		<li><a href="/crm/material/cate-list">溯源类目列表</a></li>
		<li><a href="/crm/material/list">溯源列表</a></li>
		<li><a href="/crm/material/report-list">溯源报告列表</a></li>
	</ul>
</div>
<div class="main-ct w1180">
<!-- 	<a href="javascript:;" class="btn-cs btn-blue btn-fillet mt10">返 回</a> -->
<form id="commonForm" method="post" action="/crm/material/update">
	<div class="form-info mt20">
	
		<dl>
			<dt>溯源类目：</dt>
			<dd>
    			<select name="material_category_id" id="material_category_id">
    				<option value="">请选择</option>
    				<?php if ($this->cate):?>
    				<?php foreach ($this->cate as $k=>$v):?>
        				<option value="<?php echo $v['material_category_id']; ?>"><?php echo $v['material_category_name']; ?></option>
        			<?php endforeach; ?>
        			<?php else:?>
        				<option value="">请选择</option>
    				<?php endif;?>
    			</select>
			</dd>
		</dl>
		<dl>
			<dt>商品：</dt>
			<dd>
    			<select name="product_id" id="product_id">
    				<option value="">请选择</option>
					<?php if ($this->product):?>
    				<?php foreach ($this->product as $k=>$v):?>
        				<option value="<?php echo $v['product_id']; ?>"><?php echo $v['product_name']; ?></option>
        			<?php endforeach; ?>
        			<?php else:?>
        				<option value="">请选择</option>
    				<?php endif;?>
    			</select>
			</dd>
		</dl>
		<dl>
			<dt>材源代码：</dt>
			<dd><input type="text" class="txt" name="material_code" id="material_code" value="<?php echo $this->material['material_code'];?>"></dd>
		</dl>
		<dl>
			<dt>材料名称：</dt>
			<dd><input type="text" class="txt" name="material_name" id="material_name" value="<?php echo $this->material['material_name'];?>"></dd>
		</dl>
		<dl>
			<dt>源头：</dt>
			<dd><input type="text" class="txt" name="original" id="original" value="<?php echo $this->material['original'];?>"></dd>
		</dl>
		<dl>
			<dt>简介：</dt>
			<dd><textarea  name="description" id="description"><?php echo $this->material['description'];?></textarea></dd>
		</dl>
		<dl>
			<dt>生产流程：</dt>
			<dd><textarea  name="workflow" id="workflow"><?php echo $this->material['workflow'];?></textarea></dd>
		</dl>
		<dl>
			<dt>特点：</dt>
			<dd><input type="text" class="txt" name="feature" id="feature" value="<?php echo $this->material['feature'];?>"></dd>
		</dl>
		<dl>
			<dt>联系方式：</dt>
			<dd><input type="text" class="txt" name="contact" id="contact" value="<?php echo $this->material['contact'];?>"></dd>
		</dl>
		<dl>
			<dt>地址：</dt>
			<dd><input type="text" class="txt" name="address" id="address" value="<?php echo $this->material['address'];?>"></dd>
		</dl>

	</div>
	<p class="mt30 txt-center">
		<input type="hidden" name="material_id" value="<?php echo $this->material['material_id'];?>">
		<input class="input-cs btn-fillet btn-green" type="submit" value="确定" />
	</p>
</form>
</div>

	<script>
	$().ready(function() {
		$("#commonForm").validate({
			debug:true,
			rules: {
				
				product_id: {
					required: true,
				},
				material_category_id: {
					required: true,
				},
				material_code: {
					required: true,
				},
				material_name: {
					required: true,
				},
				original: {
					required: true,
				},
				description: {
					required: true,
				},
				workflow: {
					required: true,
				},
				feature: {
					required: true,
				},
				contact: {
					required: true,
				},
				address: {
					required: true,
				},
		
			},
    		submitHandler:function(form){ 
    	            form.submit();
    	    }   
		});

	});
	</script>